xfrm_user: validate XFRM_MSG_NEWAE incoming ESN size harder
authorAndy Whitcroft <apw@canonical.com>
Thu, 23 Mar 2017 07:45:44 +0000 (07:45 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 30 Mar 2017 01:16:33 +0000 (01:16 +0000)
commit6eae873c469fc9876495be04c3d9436cb1d8983f
tree501649fcbcbe53c3cdb9eec75fb66bc39612006e
parent3a72d8a0a1ed5b009e31be538ef74f3042ae46cc
xfrm_user: validate XFRM_MSG_NEWAE incoming ESN size harder

Kees Cook has pointed out that xfrm_replay_state_esn_len() is subject to
wrapping issues.  To ensure we are correctly ensuring that the two ESN
structures are the same size compare both the overall size as reported
by xfrm_replay_state_esn_len() and the internal length are the same.

CVE-2017-7184
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name xfrm_user-validate-xfrm_msg_newae-incoming-esn-size-harder.patch
net/xfrm/xfrm_user.c